
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 2
 * @Author : WangRuoyu 
 * @Date : 2023/5/18 15:07
 */

#include "iostream"

using namespace std;

int main() {
    int n, l, r, t;
    scanf("%d %d %d %d", &n, &l, &r, &t);

    int image[n + 1][n + 1];
    for (int i = 0; i <= n; ++i) {
        for (int j = 0; j <= n; ++j) {
            if (!i || !j) {
                image[i][j] = 0;
            } else {
                scanf("%d", &image[i][j]);
                image[i][j] += image[i - 1][j] + image[i][j - 1] - image[i - 1][j - 1];
            }
        }
    }

    int res = 0;
    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
            int x1, y1, x2, y2;
            x1 = max(1, i - r);
            x2 = min(n, i + r);
            y1 = max(1, j - r);
            y2 = min(n, j + r);

            int num = (x2 - x1 + 1) * (y2 - y1 + 1);
            int sum = image[x2][y2] + image[x1 - 1][y1 - 1] - image[x2][y1 - 1] - image[x1 - 1][y2];

            if (sum * 1.0 / num <= t) res++;
        }
    }

    cout << res;

    return 0;
}